package com.uyayo.portal.controller;

import com.uyayo.cms.service.CmsArticleService;
import com.uyayo.cms.service.CmsChannelService;
import com.uyayo.cms.service.CmsSiteService;
import com.uyayo.portal.biz.CmsSiteBiz;
import com.uyayo.portal.biz.ParamBiz;
import com.uyayo.ucenter.service.MemberVisitorLogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.ServletException;
import java.io.IOException;


/**
 * 
 * <p>
 * Title: HomeController
 * </p>
 * <p>
 * Description:主页的Controller
 * </p>
 * <p>
 * Company: www.lelekeji.com
 * </p>
 * 
 * @author 乐乐科技.胡逢君
 * @date 2016-4-23下午4:03:35
 * @version 1.0
 */
@Controller
@RequestMapping("/member")
public class MemberIndexController {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	private final ParamBiz paramBiz;

	private final CmsSiteBiz cmsSiteBiz;

	private final CmsSiteService cmsSiteService;

	private final CmsChannelService cmsChannelService;

	private final CmsArticleService cmsArticleService;

	private  final MessageSource messageSource;

	private final MemberVisitorLogService memberVisitorLogService;
	@Autowired
	public MemberIndexController(MessageSource messageSource, CmsArticleService cmsArticleService, CmsChannelService cmsChannelService, CmsSiteService cmsSiteService, CmsSiteBiz cmsSiteBiz, ParamBiz paramBiz, MemberVisitorLogService memberVisitorLogService) {
		this.messageSource = messageSource;
		this.cmsArticleService = cmsArticleService;
		this.cmsChannelService = cmsChannelService;
		this.cmsSiteService = cmsSiteService;
		this.cmsSiteBiz = cmsSiteBiz;
		this.paramBiz = paramBiz;
		this.memberVisitorLogService = memberVisitorLogService;
	}


	/**
	 * 会员首页跳转
	 */
	@RequestMapping(value={"index","index.html","/","","home.html"},method=RequestMethod.GET)
	public ModelAndView home_index(ModelAndView modelAndView) {
		modelAndView.setViewName(paramBiz.getMemberTemplatesPrefix()+"home");
		return modelAndView;	
	}



}
